﻿Imports System.Xml.Serialization
Imports KanBan.Pgd.Common

Namespace Resources

    <XmlType(AnonymousType:=True), _
     XmlRoot(ElementName:="goalDefinitions", [Namespace]:="", IsNullable:=False)> _
    Partial Public Class GoalDefinitionResource

        Private _goalDefinitions As GoalDefinitionItem()

        <XmlElement("goalDefinition", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified)> _
        Public Property GoalDefinitions() As GoalDefinitionItem()
            Get
                Return _goalDefinitions
            End Get
            Set(ByVal value As GoalDefinitionItem())
                _goalDefinitions = value
            End Set
        End Property

        Public Shared Function GetResource() As GoalDefinitionResource
            Return XmlDeserializer(Of GoalDefinitionResource).Deserialize("Resources\GoalDefinitions.xml")
        End Function

    End Class

    <XmlType(AnonymousType:=True)> _
    Partial Public Class GoalDefinitionItem

        Private _id As String

        Private _name As String

        Private _description As String

        Private _areaId As String

        Private _profileId As String

        <XmlAttribute("id")> _
        Public Property Id() As String
            Get
                Return Me._id
            End Get
            Set(ByVal value As String)
                Me._id = value
            End Set
        End Property

        <XmlAttribute("name")> _
        Public Property Name() As String
            Get
                Return Me._name
            End Get
            Set(ByVal value As String)
                Me._name = value
            End Set
        End Property

        <XmlAttribute("description")> _
        Public Property Description() As String
            Get
                Return _description
            End Get
            Set(ByVal value As String)
                _description = value
            End Set
        End Property

        <XmlAttribute("areaId")> _
        Public Property AreaId() As String
            Get
                Return _areaId
            End Get
            Set(ByVal value As String)
                _areaId = value
            End Set
        End Property

        <XmlAttribute("profileId")> _
        Public Property ProfileId() As String
            Get
                Return _profileId
            End Get
            Set(ByVal value As String)
                _profileId = value
            End Set
        End Property

    End Class

End Namespace
